Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc: use methods instead of functions in middle::ty. #26575

Merged
merged 6 commits into from
Jun 27, 2015

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Jun 25, 2015

Next step towards split local/global type contexts, after #26351.
cc @rust-lang/compiler @jroesch

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@barosl
Copy link
Contributor

barosl commented Jun 25, 2015

O.o This is a HUGE refactoring! 👏 👍 🍰

I also wonder how many PRs will be marked as unmergeable because of this... 😆

@eddyb
Copy link
Member Author

eddyb commented Jun 25, 2015

@barosl it's a... prerequisite for a prerequisite (TyCx<'a, 'tcx>) for split local/global type contexts.
I'm a bit worried that it doesn't help as much as I had hoped or that it will be controversial.

It's also going to rot if it doesn't get reviewed this week, but most changes were mechanical, so unless there are significant changes to middle::ty, it should be possible to rebase it manually.

@alexcrichton
Copy link
Member

r? @nrc (or other @rust-lang/compiler folks)

@rust-highfive rust-highfive assigned nrc and unassigned alexcrichton Jun 26, 2015
@nrc
Copy link
Member

nrc commented Jun 26, 2015

r? @nikomatsakis

@rust-highfive rust-highfive assigned nikomatsakis and unassigned nrc Jun 26, 2015
@bors
Copy link
Contributor

bors commented Jun 26, 2015

☔ The latest upstream changes (presumably #26415) made this pull request unmergeable. Please resolve the merge conflicts.

@eddyb eddyb changed the title rustc: use methods instead of functions in middle::ty. rustc: use methods instead of middle::ty functions and alias &'a ctxt<'tcx> to TyCx<'a, 'tcx>. Jun 26, 2015
@eddyb eddyb changed the title rustc: use methods instead of middle::ty functions and alias &'a ctxt<'tcx> to TyCx<'a, 'tcx>. rustc: use only methods in middle::ty and replace &'a ctxt<'tcx> with TyCx<'a, 'tcx>. Jun 26, 2015
@eddyb
Copy link
Member Author

eddyb commented Jun 26, 2015

I might remove the last two commits - if we can get something like '_ working (to replace &ty::ctxt<'tcx> with TyCx<'_, 'tcx>), even if it's feature-gated, the existing TyCx commits would be obsoleted (and merging them would make it harder to switch to '_ later).
Also see https://internals.rust-lang.org/t/flattening-the-contexts-for-fun-and-profit/2293.

@eddyb eddyb changed the title rustc: use only methods in middle::ty and replace &'a ctxt<'tcx> with TyCx<'a, 'tcx>. rustc: use methods instead of functions in middle::ty. Jun 26, 2015
@eddyb
Copy link
Member Author

eddyb commented Jun 26, 2015

@nikomatsakis I've removed the TyCx commits from this PR - they are now at https://github.com/eddyb/rust/commits/tycx-more-tcx-tcx.
If #26598 is merged, introducing TyCx will be way less painful (though it does mean a couple of days were wasted) - also see rust-lang/rfcs#1177.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jun 27, 2015

📌 Commit ad66c21 has been approved by nikomatsakis

@nikomatsakis
Copy link
Contributor

@eddyb this is nice!

@bors
Copy link
Contributor

bors commented Jun 27, 2015

⌛ Testing commit ad66c21 with merge 650566e...

bors added a commit that referenced this pull request Jun 27, 2015
Next step towards split local/global type contexts, after #26351.
cc @rust-lang/compiler @jroesch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants